package com.xuecheng.manage_cms.service;

import com.xuecheng.framework.domain.cms.CmsPage;
import com.xuecheng.framework.domain.cms.request.QueryPageRequest;
import com.xuecheng.framework.domain.cms.response.CmsPageResult;
import com.xuecheng.framework.domain.cms.response.CmsPostPageResult;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author Kidy
 * @date 2020/6/18 16:47
 */
public interface PageService {

    /**
     * 页面查询
     *
     * @param page             页码,从一开始计数
     * @param size             每页记录数
     * @param queryPageRequest 查询条件
     * @return
     */
    public QueryResponseResult findList(int page, int size, QueryPageRequest queryPageRequest);

    public CmsPageResult add(CmsPage cmsPage);

    public CmsPage findById(String id);

    public CmsPageResult edit(String id, CmsPage cmsPage);

    public ResponseResult delete(String id);

    public String getPageHtml(String pageId) throws IOException;

    public ResponseResult post(String pageId);

    public CmsPageResult save(CmsPage cmsPage);

    public CmsPostPageResult postPageQuick(CmsPage cmsPage);
}
